\(\int \frac {(d+e x) (a+b \log (c x^n))}{x} \, dx\) [5]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 19, antiderivative size = 44 \[ \int \frac {(d+e x) \left (a+b \log \left (c x^n\right )\right )}{x} \, dx=a e x-b e n x+b e x \log \left (c x^n\right )+\frac {d \left (a+b \log \left (c x^n\right )\right )^2}{2 b n} \]

[Out]

a*e*x-b*e*n*x+b*e*x*ln(c*x^n)+1/2*d*(a+b*ln(c*x^n))^2/b/n

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 44, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {2388, 2338, 2332} \[ \int \frac {(d+e x) \left (a+b \log \left (c x^n\right )\right )}{x} \, dx=\frac {d \left (a+b \log \left (c x^n\right )\right )^2}{2 b n}+a e x+b e x \log \left (c x^n\right )-b e n x \]

[In]

Int[((d + e*x)*(a + b*Log[c*x^n]))/x,x]

[Out]

a*e*x - b*e*n*x + b*e*x*Log[c*x^n] + (d*(a + b*Log[c*x^n])^2)/(2*b*n)

Rule 2332

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2338

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rule 2388

Int[(((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_))^(q_.))/(x_), x_Symbol] :> Dist[d, Int[(d
+ e*x)^(q - 1)*((a + b*Log[c*x^n])^p/x), x], x] + Dist[e, Int[(d + e*x)^(q - 1)*(a + b*Log[c*x^n])^p, x], x] /
; FreeQ[{a, b, c, d, e, n}, x] && IGtQ[p, 0] && GtQ[q, 0] && IntegerQ[2*q]

Rubi steps \begin{align*} \text {integral}& = d \int \frac {a+b \log \left (c x^n\right )}{x} \, dx+e \int \left (a+b \log \left (c x^n\right )\right ) \, dx \\ & = a e x+\frac {d \left (a+b \log \left (c x^n\right )\right )^2}{2 b n}+(b e) \int \log \left (c x^n\right ) \, dx \\ & = a e x-b e n x+b e x \log \left (c x^n\right )+\frac {d \left (a+b \log \left (c x^n\right )\right )^2}{2 b n} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 43, normalized size of antiderivative = 0.98 \[ \int \frac {(d+e x) \left (a+b \log \left (c x^n\right )\right )}{x} \, dx=a e x-b e n x+a d \log (x)+b e x \log \left (c x^n\right )+\frac {b d \log ^2\left (c x^n\right )}{2 n} \]

[In]

Integrate[((d + e*x)*(a + b*Log[c*x^n]))/x,x]

[Out]

a*e*x - b*e*n*x + a*d*Log[x] + b*e*x*Log[c*x^n] + (b*d*Log[c*x^n]^2)/(2*n)

Maple [A] (verified)

Time = 0.08 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.05

method result size
default \(\ln \left (x \right ) a d +a e x +b e x \ln \left (c \,{\mathrm e}^{n \ln \left (x \right )}\right )+\frac {b d \ln \left (c \,{\mathrm e}^{n \ln \left (x \right )}\right )^{2}}{2 n}-b e n x\) \(46\)
parts \(\ln \left (x \right ) a d +a e x +b e x \ln \left (c \,{\mathrm e}^{n \ln \left (x \right )}\right )+\frac {b d \ln \left (c \,{\mathrm e}^{n \ln \left (x \right )}\right )^{2}}{2 n}-b e n x\) \(46\)
parallelrisch \(\frac {2 x \ln \left (c \,x^{n}\right ) b e n -2 x b e \,n^{2}+2 \ln \left (x \right ) a d n +2 x a e n +b d \ln \left (c \,x^{n}\right )^{2}}{2 n}\) \(51\)
norman \(\left (-b e n +a e \right ) x +\frac {a d \ln \left (c \,{\mathrm e}^{n \ln \left (x \right )}\right )}{n}+b e x \ln \left (c \,{\mathrm e}^{n \ln \left (x \right )}\right )+\frac {b d \ln \left (c \,{\mathrm e}^{n \ln \left (x \right )}\right )^{2}}{2 n}\) \(56\)
risch \(\left (b e x +b d \ln \left (x \right )\right ) \ln \left (x^{n}\right )-\frac {b d n \ln \left (x \right )^{2}}{2}-\frac {i \pi b e x \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )}{2}+\frac {i \pi b e x \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}}{2}+\frac {i \pi b e x \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}}{2}-\frac {i \pi b e x \operatorname {csgn}\left (i c \,x^{n}\right )^{3}}{2}+\ln \left (c \right ) b e x -b e n x +a e x -\frac {i \ln \left (x \right ) \pi b d \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )}{2}+\frac {i \ln \left (x \right ) \pi b d \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}}{2}+\frac {i \ln \left (x \right ) \pi b d \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}}{2}-\frac {i \ln \left (x \right ) \pi b d \operatorname {csgn}\left (i c \,x^{n}\right )^{3}}{2}+\ln \left (x \right ) \ln \left (c \right ) b d +\ln \left (x \right ) a d\) \(238\)

[In]

int((e*x+d)*(a+b*ln(c*x^n))/x,x,method=_RETURNVERBOSE)

[Out]

ln(x)*a*d+a*e*x+b*e*x*ln(c*exp(n*ln(x)))+1/2*b*d/n*ln(c*exp(n*ln(x)))^2-b*e*n*x

Fricas [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 45, normalized size of antiderivative = 1.02 \[ \int \frac {(d+e x) \left (a+b \log \left (c x^n\right )\right )}{x} \, dx=\frac {1}{2} \, b d n \log \left (x\right )^{2} + b e x \log \left (c\right ) - {\left (b e n - a e\right )} x + {\left (b e n x + b d \log \left (c\right ) + a d\right )} \log \left (x\right ) \]

[In]

integrate((e*x+d)*(a+b*log(c*x^n))/x,x, algorithm="fricas")

[Out]

1/2*b*d*n*log(x)^2 + b*e*x*log(c) - (b*e*n - a*e)*x + (b*e*n*x + b*d*log(c) + a*d)*log(x)

Sympy [A] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 65, normalized size of antiderivative = 1.48 \[ \int \frac {(d+e x) \left (a+b \log \left (c x^n\right )\right )}{x} \, dx=\begin {cases} \frac {a d \log {\left (c x^{n} \right )}}{n} + a e x + \frac {b d \log {\left (c x^{n} \right )}^{2}}{2 n} - b e n x + b e x \log {\left (c x^{n} \right )} & \text {for}\: n \neq 0 \\\left (a + b \log {\left (c \right )}\right ) \left (d \log {\left (x \right )} + e x\right ) & \text {otherwise} \end {cases} \]

[In]

integrate((e*x+d)*(a+b*ln(c*x**n))/x,x)

[Out]

Piecewise((a*d*log(c*x**n)/n + a*e*x + b*d*log(c*x**n)**2/(2*n) - b*e*n*x + b*e*x*log(c*x**n), Ne(n, 0)), ((a
+ b*log(c))*(d*log(x) + e*x), True))

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 41, normalized size of antiderivative = 0.93 \[ \int \frac {(d+e x) \left (a+b \log \left (c x^n\right )\right )}{x} \, dx=-b e n x + b e x \log \left (c x^{n}\right ) + a e x + \frac {b d \log \left (c x^{n}\right )^{2}}{2 \, n} + a d \log \left (x\right ) \]

[In]

integrate((e*x+d)*(a+b*log(c*x^n))/x,x, algorithm="maxima")

[Out]

-b*e*n*x + b*e*x*log(c*x^n) + a*e*x + 1/2*b*d*log(c*x^n)^2/n + a*d*log(x)

Giac [A] (verification not implemented)

none

Time = 0.36 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.07 \[ \int \frac {(d+e x) \left (a+b \log \left (c x^n\right )\right )}{x} \, dx=b e n x \log \left (x\right ) + \frac {1}{2} \, b d n \log \left (x\right )^{2} - {\left (b e n - b e \log \left (c\right ) - a e\right )} x + {\left (b d \log \left (c\right ) + a d\right )} \log \left (x\right ) \]

[In]

integrate((e*x+d)*(a+b*log(c*x^n))/x,x, algorithm="giac")

[Out]

b*e*n*x*log(x) + 1/2*b*d*n*log(x)^2 - (b*e*n - b*e*log(c) - a*e)*x + (b*d*log(c) + a*d)*log(x)

Mupad [B] (verification not implemented)

Time = 0.31 (sec) , antiderivative size = 40, normalized size of antiderivative = 0.91 \[ \int \frac {(d+e x) \left (a+b \log \left (c x^n\right )\right )}{x} \, dx=a\,d\,\ln \left (x\right )+e\,x\,\left (a-b\,n\right )+b\,e\,x\,\ln \left (c\,x^n\right )+\frac {b\,d\,{\ln \left (c\,x^n\right )}^2}{2\,n} \]

[In]

int(((a + b*log(c*x^n))*(d + e*x))/x,x)

[Out]

a*d*log(x) + e*x*(a - b*n) + b*e*x*log(c*x^n) + (b*d*log(c*x^n)^2)/(2*n)